import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/home',
      name: 'home',
      component: ()=>import('@/views/Home.vue'),
      children:[
          {path:'',name:"index",component:()=>import('@/views/Index.vue')},
          {
            path:'xinxi',
            component:()=>import('@/views/Xinxi.vue')
          },
          {
            path:'admin',
            component:()=>import('@/views/Admin.vue')
          },
          {
            path:'ding',
            component:()=>import('@/views/Ding.vue')
          },
          {
            path:'yd',
            component:()=>import('@/views/Yd.vue')
          },
          {
            path:'gk',
            component:()=>import('@/views/Gk.vue')
          },
      ]
    },
    {
      path: '/',
      name: 'login',
      component: ()=>import('@/views/Login.vue')
    },
    {
      path: '/reg',
      component: ()=>import('@/views/Register.vue')
    },
  ],
})

export default router
